import request from '@/http/request'
// 外表列表查询

export const $apiVirtualGoodsInside = ( params) => {
    return request.request({ url: '/api/virtualGoods/inside', method: 'GET', params: params }, true, true, false)
  }
// 划拨保存接口
export const $apiVirtualGoodsInsideSaveCdkNum = (data) => {
    return request.request({ url: '/api/virtualGoods/inside/saveCdkNum', method: 'POST', data: data }, true, true, false)
  }

// 内部商品划拨
export function $transferGoods(data){
    return request.request({
      url: '/api/virtualGoods/inside/getCdkDetail',
      method: 'POST',
      data:data
    })
  }

  // 获取三级机构列表
export function $getAgentList(params){
    return request.request({
      url: '/api/subList/queryOrgTree',
      method: 'GET',
      params:params
    })
  }

  // 外表列表修改
// export const API_URL_VIRTUAGOODS_INSIDE_UPDATE = '/api/virtualGoods/inside/update'
export const $apiVirtualGoodsInsideUpdate = (data) => {
    return request.request({ url: '/api/virtualGoods/inside/update', method: 'POST', data: data }, true, true, false)
  }

    /* 获取请求参数 */
export function $getUploadFormParams (file, bizType) {  
  return request.request({
    url: '/api/ossFiles/form',
    method: 'post',
    data: { bizType : bizType, sourceFileName: file.name, sourceFileSize: file.size }
  })
}

// CDK列表导入
export const $apiVirtualAwardCdkImportCdk = ( data) => {
  return request.request({ url: '/api/virtualAward/cdk/importCdk', method: 'POST', data: data }, true, true, false)
}


// 获取已经划拨的商品
export function $getUsedCdkList(data){
    return request.request({
      url: '/api/virtualAward/cdk/queryUsedCdkList',
      method: 'POST',
      data:data
    })
  }